<?php
class File{
	public static function GetRealSize($file) {
        clearstatcache();
        $INT = 4294967295;
        $size = filesize($file);
	    if ($size == 0){
	    	return 0;    
	    }
	        $fp = fopen($file, 'r');
	        fseek($fp, 0, SEEK_END);
	        if (ftell($fp)==0) $size += $INT;
	        fclose($fp);
	        if ($size<0) $size += $INT;
        return ceil($size);
	}
	
	public static function file_to_path($file){
		$file_array=unserialize(Folder::array_folder());
		for ($i=0;$i<count($file_array);$i++){
			if ($file == $file_array[$i][0]) {
				return $file_array[$i][3];
			}
		}
		return false;
	}
	
	
}
?>